<?php
/**
 * @author Pham Van Diep
 * @copyright 2014
 * @description: delete club record
 */
// not login
// not perm ad
if(!isset($AppUI->id) || ($AppUI->type < PERMISSION_DELETE)) {
    redirect(isset($_SESSION[SESSION_BACKURL]) ? $_SESSION[SESSION_BACKURL] : HOST_BACKEND);
}
$intID = $this->input->get('clubid');
if($AppUI->type == ROLE_ROOT) {
// XOA KHOI DATABASE
	$this->club->delete($AppUI->id, $intID);
}else{
	// thay doi trang thai => inactive
	$intStatus = 0;
	//$intPerm = 
	//$this->club->upateStatus($AppUI->id, $intID,$intStatus,$intPerm);
}
redirect(isset($_SESSION[SESSION_BACKURL]) ? $_SESSION[SESSION_BACKURL] : HOST_BACKEND);
